/*
 * @Author: libaihao 22857108132qq.com
 * @Date: 2022-09-29 16:33:39
 * @LastEditors: libaihao 22857108132qq.com
 * @LastEditTime: 2022-10-25 15:29:05
 * @FilePath: \vue02 - 副本\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
//导入 HomeView的组件
import Home from "@/views/Home";
import Login from "@/views/Login";
Vue.use(VueRouter)
/*
这个是路由表，也就是这个项目中，路径和页面之间的一一对应关系
 */
const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push (location) {

return originalPush.call(this, location).catch(err => err)

}

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
  },
  {
    path: '/home',
    name: '首页',
    component: Home,
    children:[
      ]
  },

  
]

const router = new VueRouter({
  routes
})

export default router
